package com.ctshk.sapp.tour.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.rpc.tour.req.SeriesTripScheduleItineraryDayReq;
import com.ctshk.rpc.tour.req.TripBasicInformationReq;
import com.ctshk.rpc.tour.service.ISeriesTripScheduleItineraryDayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

import com.ctshk.common.web.support.BaseController;

import javax.validation.Valid;

/**
 * <p>
 * 行程每日介绍 前端控制器
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-13
 */
@Api(value="新增行程--行程信息", tags="新增行程--行程信息")
@RestController
@RequestMapping("/series/trip/schedule/itinerary/day")
public class SeriesTripScheduleItineraryDayController extends BaseController {

    @DubboReference
    private ISeriesTripScheduleItineraryDayService seriesTripScheduleItineraryDayService;

    @ApiOperation(value = "新增行程-行程信息", notes = "新增行程-行程信息")
    @OperationLogAnnotation(operModul = OperationLogModel.TOUR, operType = OperationLogType.ADD, operTitle = "新增行程-行程信息", operDesc = "新增行程-行程信息")
    @PostMapping("/itinerary/information")
    public Result itineraryInformation(@RequestBody @Valid SeriesTripScheduleItineraryDayReq seriesTripScheduleItineraryDayReq) {
        seriesTripScheduleItineraryDayService.itineraryInformation(seriesTripScheduleItineraryDayReq,getCurrentUser(getRequest()).getId());
        return Result.success();
    }

}
